package request

import (
	"gitee.com/cjsn/topsdk/util"
)

type AlibabaServicecenterSpserviceorderQueryRequest struct {
	/*
	   状态码，可传多个     */
	StatusCodes *string `json:"status_codes,omitempty" required:"false" `
	/*
	   查询第几页，默认1 defalutValue��1    */
	CurrentPage *int64 `json:"current_page,omitempty" required:"false" `
	/*
	   每页大小，默认50，最大50 defalutValue��50    */
	PageSize *int64 `json:"page_size,omitempty" required:"false" `
	/*
	   服务单修改时间(时间段15分钟以内)(包含时分秒)     */
	GmtModifiedEnd *util.LocalTime `json:"gmt_modified_end,omitempty" required:"false" `
	/*
	   服务单修改时间(包含时分秒)     */
	GmtModifiedStart *util.LocalTime `json:"gmt_modified_start,omitempty" required:"false" `
	/*
	   实物主订单id(消费者在淘宝订单里看到的订单号)     */
	MasterParentBizOrderId *int64 `json:"master_parent_biz_order_id,omitempty" required:"false" `
	/*
	   服务单id     */
	SpServiceOrderId *int64 `json:"sp_service_order_id,omitempty" required:"false" `
}

func (s *AlibabaServicecenterSpserviceorderQueryRequest) SetStatusCodes(v string) *AlibabaServicecenterSpserviceorderQueryRequest {
	s.StatusCodes = &v
	return s
}
func (s *AlibabaServicecenterSpserviceorderQueryRequest) SetCurrentPage(v int64) *AlibabaServicecenterSpserviceorderQueryRequest {
	s.CurrentPage = &v
	return s
}
func (s *AlibabaServicecenterSpserviceorderQueryRequest) SetPageSize(v int64) *AlibabaServicecenterSpserviceorderQueryRequest {
	s.PageSize = &v
	return s
}
func (s *AlibabaServicecenterSpserviceorderQueryRequest) SetGmtModifiedEnd(v util.LocalTime) *AlibabaServicecenterSpserviceorderQueryRequest {
	s.GmtModifiedEnd = &v
	return s
}
func (s *AlibabaServicecenterSpserviceorderQueryRequest) SetGmtModifiedStart(v util.LocalTime) *AlibabaServicecenterSpserviceorderQueryRequest {
	s.GmtModifiedStart = &v
	return s
}
func (s *AlibabaServicecenterSpserviceorderQueryRequest) SetMasterParentBizOrderId(v int64) *AlibabaServicecenterSpserviceorderQueryRequest {
	s.MasterParentBizOrderId = &v
	return s
}
func (s *AlibabaServicecenterSpserviceorderQueryRequest) SetSpServiceOrderId(v int64) *AlibabaServicecenterSpserviceorderQueryRequest {
	s.SpServiceOrderId = &v
	return s
}

func (req *AlibabaServicecenterSpserviceorderQueryRequest) ToMap() map[string]interface{} {
	paramMap := make(map[string]interface{})
	if req.StatusCodes != nil {
		paramMap["status_codes"] = *req.StatusCodes
	}
	if req.CurrentPage != nil {
		paramMap["current_page"] = *req.CurrentPage
	}
	if req.PageSize != nil {
		paramMap["page_size"] = *req.PageSize
	}
	if req.GmtModifiedEnd != nil {
		paramMap["gmt_modified_end"] = *req.GmtModifiedEnd
	}
	if req.GmtModifiedStart != nil {
		paramMap["gmt_modified_start"] = *req.GmtModifiedStart
	}
	if req.MasterParentBizOrderId != nil {
		paramMap["master_parent_biz_order_id"] = *req.MasterParentBizOrderId
	}
	if req.SpServiceOrderId != nil {
		paramMap["sp_service_order_id"] = *req.SpServiceOrderId
	}
	return paramMap
}

func (req *AlibabaServicecenterSpserviceorderQueryRequest) ToFileMap() map[string]interface{} {
	fileMap := make(map[string]interface{})
	return fileMap
}
